#include <iostream>
#include <vector>
#include "priority_queue.h"
#include "queue.h"
#include "stack.h"
using namespace std;


void test_priority_queue()
{
	// 默认大的优先级高
	chy::priority_queue<int> pq;
	//std::less<int> ls;
	//std::greater<int> gt;
	//std::priority_queue<int> pq(ls);

	pq.push(3);
	pq.push(1);
	pq.push(2);
	pq.push(5);
	pq.push(0);
	pq.push(1);

	while (!pq.empty())
	{
		cout << pq.top() << " ";
		pq.pop();
	}
	cout << endl;

	int a[] = { 3, 2, 7, 6, 0, 4, 1, 9, 8, 5 };
	chy::priority_queue<int> heap(a, a+sizeof(a)/sizeof(int));
	//chy::priority_queue<int, vector<int>, greater<int>> heap(a, a + sizeof(a) / sizeof(int));

	while (!heap.empty())
	{
		cout << heap.top() << " ";
		heap.pop();
	}
	cout << endl;
}

int main()
{
	test_priority_queue();
	return 0;
}